package com.tencent.qcloud.qiaoqiao.ui.activity;

import android.content.Intent;
import android.os.Bundle;

import com.tencent.qcloud.qiaoqiao.R;
import com.tencent.qcloud.qiaoqiao.ui.BaseActivity;
import com.tencent.qcloud.qiaoqiao.ui.fragment.MineFragment;
import com.tencent.qcloud.qiaoqiao.ui.tools.utilCode.ActivityUtils;

public class UserInfoActivity extends BaseActivity {

    public static void StartActivity(String userId){
        Intent intent = new Intent();
        intent.putExtra("userId",userId);
        intent.setClass(ActivityUtils.getTopActivity(),UserInfoActivity.class);
        ActivityUtils.getTopActivity().startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_info_layout);
        getSupportFragmentManager()    //
                .beginTransaction()
                .add(R.id.fragment_container,MineFragment.newInstance(getIntent().getStringExtra("userId")))   // 此处的R.id.fragment_container是要盛放fragment的父容器
                .commit();
    }

}
